package com.ruoyi.safe.controller.app;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.safe.domain.TSpecialZone;
import com.ruoyi.safe.service.ITSpecialZoneService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

import static com.ruoyi.common.constant.Constants.APP_API_PREFIX;

/**
 * 专区Controller
 *
 * @author zmk
 * @date 2025-03-24
 */
@RestController
@RequestMapping(APP_API_PREFIX + "/safe/zone")
public class TSpecialZoneAppController extends BaseController {
    @Resource
    private ITSpecialZoneService tSpecialZoneService;

    /**
     * 查询专区列表
     */
    @GetMapping("/list")
    public AjaxResult list() {
        List<TSpecialZone> list = tSpecialZoneService.selectTSpecialZoneAppList();
        return success(list);
    }

    @GetMapping("/my-zone")
    public AjaxResult myZone() {
        List<TSpecialZone> list = tSpecialZoneService.getMyZone(getAppUserId());
        return success(list);
    }

}
